package com.toutoushidao.ssm.dto;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.toutoushidao.ssm.util.Mapper;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * 传入多个Bean转换为同一的Map，如果Bean的值为空，则被忽略
 * @author laodun
 */

@JsonInclude(JsonInclude.Include.NON_NULL)
public class PageResult<T> extends BaseResult implements Serializable {
    private Map data;

    public PageResult(Integer error, String message, List<Object> list, Integer total) {
        super(error, message, null);
        data.put("list", list);
        data.put("total", total);
    }
}
